import { request } from './request';

export interface SolveGigaCaptchaResult {
  status: 'success' | 'error';
  message: string;
  url: string;
  content: string;
}
export async function solveGigaCaptcha<T = SolveGigaCaptchaResult>(id: string) {
  return request<T, T>({
    url: `http://localhost:8000/solve_captcha`,
    method: 'GET',
    params: {
      url: `https://www.gigab2b.com/index.php?route=product/product&product_id=${id}`,
    },
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
    },
  });
}
